/*==============================================================================
            Copyright (c) 2013 Moritz Hader, Marcel Schrder
            All Rights Reserved.

	@file  HeimdallObjectContainer.h

	@brief This header provides the class-definitions of the HeimdallObjectContainer.
	The linked list serves as a container for Heimdall3DObjects that
	are passed down from the java-code. It will maintain a consecutive list of
	elements that can be arbitrary extended or reduced without the need of
	copying and resizing an array.
   
   This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
================================================================================*/

#ifndef _HEIMDALLOBJECTCONTAINER_LIBRARY__
#define _HEIMDALLOBJECTCONTAINER_LIBRARY__

//Forward-Declaration
class HeimdallNative3DObject;

class HeimdallObjectContainer{
private:
	HeimdallNative3DObject* firstElement;
	HeimdallNative3DObject* lastElement;

	int nextAvailableIndex();
		int highestKey;

public:
	HeimdallObjectContainer();
	~HeimdallObjectContainer();

	void addObject(HeimdallNative3DObject* obj);
	void deleteObject(int index);
	HeimdallNative3DObject*  getObject(int index);
	HeimdallNative3DObject* getFirstElement();

	void purgeList();
};

#endif
